home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / crwdemo / main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-05  |  19.3 KB  |  602 lines

  1. VERSION 2.00
  2. Begin MDIForm Main 
  3.    Caption         =   "Program Manager"
  4.    ClientHeight    =   5235
  5.    ClientLeft      =   900
  6.    ClientTop       =   2100
  7.    ClientWidth     =   9600
  8.    Height          =   5925
  9.    Icon            =   MAIN.FRX:0000
  10.    Left            =   840
  11.    LinkTopic       =   "Main"
  12.    Top             =   1470
  13.    Width           =   9720
  14.    WindowState     =   2  'Maximized
  15.    Begin SSPanel ToolBar 
  16.       Align           =   1  'Align Top
  17.       Height          =   555
  18.       Left            =   0
  19.       TabIndex        =   1
  20.       Top             =   0
  21.       Width           =   9600
  22.       Begin CommandButton Command5 
  23.          Caption         =   "Cancel"
  24.          Height          =   330
  25.          Left            =   4050
  26.          TabIndex        =   7
  27.          Top             =   90
  28.          Visible         =   0   'False
  29.          Width           =   780
  30.       End
  31.       Begin CommandButton Command4 
  32.          Caption         =   ">>"
  33.          Height          =   330
  34.          Left            =   2385
  35.          TabIndex        =   6
  36.          Top             =   90
  37.          Visible         =   0   'False
  38.          Width           =   735
  39.       End
  40.       Begin CommandButton Command3 
  41.          Caption         =   "<<"
  42.          Height          =   330
  43.          Left            =   1575
  44.          TabIndex        =   5
  45.          Top             =   90
  46.          Visible         =   0   'False
  47.          Width           =   735
  48.       End
  49.       Begin CommandButton Command2 
  50.          Caption         =   ">|"
  51.          Height          =   330
  52.          Left            =   3195
  53.          TabIndex        =   4
  54.          Top             =   90
  55.          Visible         =   0   'False
  56.          Width           =   780
  57.       End
  58.       Begin CommandButton Command1 
  59.          Caption         =   "|<"
  60.          Height          =   330
  61.          Left            =   720
  62.          TabIndex        =   3
  63.          Top             =   90
  64.          Visible         =   0   'False
  65.          Width           =   750
  66.       End
  67.       Begin SSCommand Preview 
  68.          BevelWidth      =   1
  69.          Height          =   375
  70.          Left            =   120
  71.          Picture         =   MAIN.FRX:0302
  72.          TabIndex        =   2
  73.          Top             =   120
  74.          Width           =   330
  75.       End
  76.       Begin CommonDialog CMDialog1 
  77.          DefaultExt      =   "*.rpt"
  78.          DialogTitle     =   "Open Report"
  79.          Filter          =   "Crystal Report(*.rpt)|*.rpt"
  80.          Left            =   9000
  81.          Top             =   0
  82.       End
  83.    End
  84.    Begin SSPanel StatusBar 
  85.       Align           =   2  'Align Bottom
  86.       Alignment       =   1  'Left Justify - MIDDLE
  87.       BorderWidth     =   1
  88.       Caption         =   " Ready"
  89.       FontBold        =   0   'False
  90.       FontItalic      =   0   'False
  91.       FontName        =   "MS Sans Serif"
  92.       FontSize        =   8.25
  93.       FontStrikethru  =   0   'False
  94.       FontUnderline   =   0   'False
  95.       Height          =   300
  96.       Left            =   0
  97.       TabIndex        =   0
  98.       Top             =   4935
  99.       Width           =   9600
  100.       Begin Line Line2 
  101.          BorderColor     =   &H00FFFFFF&
  102.          X1              =   0
  103.          X2              =   7350
  104.          Y1              =   30
  105.          Y2              =   30
  106.       End
  107.       Begin Line Line1 
  108.          BorderColor     =   &H00000000&
  109.          X1              =   0
  110.          X2              =   7350
  111.          Y1              =   15
  112.          Y2              =   15
  113.       End
  114.    End
  115.    Begin Menu MenuFile 
  116.       Caption         =   "&File"
  117.       Begin Menu MenuFileNew 
  118.          Caption         =   "&New"
  119.       End
  120.       Begin Menu MenuFileClose 
  121.          Caption         =   "&Close"
  122.          Enabled         =   0   'False
  123.       End
  124.       Begin Menu MenuFileSep 
  125.          Caption         =   "-"
  126.       End
  127.       Begin Menu MenuFileExit 
  128.          Caption         =   "E&xit"
  129.       End
  130.    End
  131.    Begin Menu MenuEngine 
  132.       Caption         =   "&Engine Management"
  133.       Begin Menu MenuEngineOpen 
  134.          Caption         =   "&Open Engine"
  135.       End
  136.       Begin Menu MenuEngineOpenJob 
  137.          Caption         =   "&Open Print Job"
  138.       End
  139.       Begin Menu MenuEngineCloseJob 
  140.          Caption         =   "&Close Print Job"
  141.       End
  142.       Begin Menu MenuEngineClose 
  143.          Caption         =   "&Close Engine"
  144.       End
  145.    End
  146.    Begin Menu MenuFormat 
  147.       Caption         =   "&Format"
  148.       Begin Menu MenuFormatRptTitle 
  149.          Caption         =   "&Report Title"
  150.       End
  151.       Begin Menu MenuFormatSetMargins 
  152.          Caption         =   "&Set Margins"
  153.       End
  154.       Begin Menu MenuFormatSetSecFormat 
  155.          Caption         =   "&Set Section Format"
  156.       End
  157.       Begin Menu MenuFormatMinSectionHeight 
  158.          Caption         =   "&Set Minimum Section Height"
  159.       End
  160.       Begin Menu MenuFormatSetLineHeight 
  161.          Caption         =   "&Set Line Height"
  162.       End
  163.       Begin Menu MenuFormatSetSectionFont 
  164.          Caption         =   "&Set Section Font"
  165.       End
  166.    End
  167.    Begin Menu MenuFields 
  168.       Caption         =   "&Fields"
  169.       Begin Menu MenuFieldsRecordSortField 
  170.          Caption         =   "&Record Sort Fields"
  171.       End
  172.       Begin Menu MenuFieldsGroupSortFields 
  173.          Caption         =   "&Group Sort Fields"
  174.       End
  175.       Begin Menu MenuGroupCond 
  176.          Caption         =   "&Set Group Condition"
  177.       End
  178.    End
  179.    Begin Menu MenuFormulas 
  180.       Caption         =   "&Formulae"
  181.       Begin Menu MenuFormulasSetFormula 
  182.          Caption         =   "&Formulae"
  183.       End
  184.       Begin Menu MenuFormulasSetSelForm 
  185.          Caption         =   "&Selection Formulae"
  186.       End
  187.    End
  188.    Begin Menu MenuDatabase 
  189.       Caption         =   "&Database"
  190.       Begin Menu MenuDBLocation 
  191.          Caption         =   "&Location"
  192.       End
  193.       Begin Menu MenuModSQL 
  194.          Caption         =   "&Modify SQL"
  195.       End
  196.       Begin Menu MenuLogon 
  197.          Caption         =   "&Logon Server"
  198.       End
  199.       Begin Menu MenuLogoff 
  200.          Caption         =   "&Logoff Server"
  201.       End
  202.       Begin Menu MenuLogonInfo 
  203.          Caption         =   "&Logon Info"
  204.       End
  205.       Begin Menu MenuSecurity 
  206.          Caption         =   "&Security"
  207.       End
  208.    End
  209.    Begin Menu MenuPrint 
  210.       Caption         =   "&Print"
  211.       Begin Menu MenuPrintdestination 
  212.          Caption         =   "&Destination"
  213.       End
  214.    End
  215.    Begin Menu MenuWindow 
  216.       Caption         =   "&Window"
  217.       WindowList      =   -1  'True
  218.       Begin Menu MenuWindowCascade 
  219.          Caption         =   "&Cascade"
  220.       End
  221.       Begin Menu MenuWindowTileH 
  222.          Caption         =   "Tile &Horizontally"
  223.       End
  224.       Begin Menu MenuWindowTileV 
  225.          Caption         =   "&Tile Vertically"
  226.       End
  227.       Begin Menu MenuWindowArrange 
  228.          Caption         =   "&Arrange"
  229.       End
  230.    End
  231. ' Crystal.Vbx doesn't have an Align Property so The ToolBar
  232. ' is used as a container.
  233. ' The following Default Properties of Crystal.Vbx have been
  234. ' changed to:-
  235. '       WindowBorderStyle = 0 - None
  236. '       WindowControlBox = False
  237. '       WindowMaxButton = False
  238. '       WindowMinButton = False
  239. '       WindowLeft = 0      'so that the MoveWindow Function
  240. '       WindowTop = 0       'doesn't jerk the Crystal Window
  241. '                           'across the MDIChild Window.
  242. '--------------------------------------------------------------------
  243.  Dim dllname As String * 20
  244. Sub Command1_Click ()
  245.  If PEShowFirstPage(JobNum) = False Then
  246.    'RCode = PEGetErrorCode(Jobnum)
  247.    'MsgBox "PEShowPreviousPage = " + RCode
  248.  End If
  249. End Sub
  250. Sub Command2_Click ()
  251.  If PEShowLastPage(JobNum) = False Then
  252.    'RCode = PEGetErrorCode(Jobnum)
  253.    'MsgBox "PEShowPreviousPage = " + RCode
  254.  End If
  255. End Sub
  256. Sub Command3_Click ()
  257.  If PEShowPreviousPage(JobNum) = False Then
  258.    'RCode = PEGetErrorCode(Jobnum)
  259.    'MsgBox "PEShowPreviousPage = " + RCode
  260.  End If
  261. End Sub
  262. Sub Command4_Click ()
  263.  If PEShowNextPage(JobNum) = False Then
  264.    'RCode = PEGetErrorCode(Jobnum)
  265.    'MsgBox "PEShowPreviousPage = " + RCode
  266.  End If
  267. End Sub
  268. Sub Command5_Click ()
  269.   PECancelPrintJob (JobNum)
  270. End Sub
  271. Sub MDIForm_Resize ()
  272.     Line1.X2 = Me.ScaleWidth
  273.     Line2.X2 = Me.ScaleWidth
  274. End Sub
  275. Sub MDIForm_Unload (Cancel As Integer)
  276.     If JobNum <> 0 Then
  277.        PEClosePrintJob (JobNum)
  278.        JobNum = 0
  279.     End If
  280.     PECloseEngine
  281.     Unload Me
  282.     End
  283. End Sub
  284. Sub MenuDBLocation_Click ()
  285.  Tablem.Show
  286. End Sub
  287. Sub MenuEditCopy_Click ()
  288.   MsgBox "Not Yet Implemented!"
  289. End Sub
  290. Sub MenuEditCut_Click ()
  291.  MsgBox "Not Yet Implemented!"
  292. End Sub
  293. Sub MenuEditPaste_Click ()
  294.    MsgBox "Not Yet Implemented!"
  295. End Sub
  296. Sub MenuEditUndo_Click ()
  297.  MsgBox "Not Yet Implemented!"
  298. End Sub
  299. Sub MenuEngineClose_Click ()
  300.   PECloseEngine
  301.   Main!StatusBar.Caption = "The engine is now closed."
  302. End Sub
  303. Sub MenuEngineCloseJob_Click ()
  304.   PEClosePrintJob (JobNum)
  305.   JobNum = 0
  306.   Main!StatusBar.Caption = "Job closed."
  307. End Sub
  308. Sub MenuEngineOpen_Click ()
  309. 'Open the Crystal Reports Print engine(i.e CRPE.DLL)
  310. 'Return of True(1) or false(0)
  311.     If PEOpenEngine() = False Then
  312.       Main!StatusBar.Caption = "The engine did not open"
  313.     Else
  314.       Main!StatusBar.Caption = "The engine is now open"
  315.     End If
  316. 'Check to see if Print job already exists
  317.     If JobNum <> 0 Then
  318.       Main!StatusBar.Caption = "Job is already open"
  319.     End If
  320. End Sub
  321. Sub MenuEngineOpenJob_Click ()
  322. 'Invoke common dialogue to choose a report file name
  323.     CMDialog1.Action = 1
  324. 'Open Print job using specified file name. The return value
  325. 'is either true(1) or false(0)
  326.     If CMDialog1.Filename <> "" Then
  327.         JobNum = PEOpenPrintJob(CMDialog1.Filename)
  328.         If JobNum <> 0 Then
  329.             Main!StatusBar.Caption = "Job opened."
  330.         Else
  331.             Main!StatusBar.Caption = "Error = " & Str$(JobNum) + " occured while trying to open the print job"
  332.         End If
  333.     End If
  334. End Sub
  335. Sub MenuFieldsGroupSortFields_Click ()
  336.  GSort.Show
  337. End Sub
  338. Sub MenuFieldsRecordSortField_Click ()
  339.  Sort.Show
  340. End Sub
  341. Sub MenuFileClose_Click ()
  342.     If Forms.Count > 1 Then
  343.         Unload ActiveForm
  344.         If Forms.Count = 1 Then
  345.             MenuFileClose.Enabled = False
  346.         End If
  347.     End If
  348. End Sub
  349. Sub MenuFileExit_Click ()
  350.     Unload Me
  351. End Sub
  352. Sub MenuFileNew_Click ()
  353. Dim C As New Child
  354. Dim JobNum As Integer
  355. 'Open the Crystal Reports Print engine(i.e CRPE.DLL)
  356. 'Return of True(1) or false(0)
  357.     If PEOpenEngine() = False Then
  358.       Main!StatusBar.Caption = "The engine did not open"
  359.     Else
  360.       Main!StatusBar.Caption = "The engine is now open"
  361.     End If
  362. 'Check to see if Print job already exists
  363.     If JobNum <> 0 Then
  364.       Main!StatusBar.Caption = "Job is already open"
  365.     End If
  366. 'Invoke common dialogue to choose a report file name
  367.     CMDialog1.Action = 1
  368. 'Open Print job using specified file name. The return value
  369. 'is either true(1) or false(0)
  370.     If CMDialog1.Filename <> "" Then
  371.         JobNum = PEOpenPrintJob(CMDialog1.Filename)
  372.         If JobNum <> 0 Then
  373.             Main!StatusBar.Caption = "Job opened."
  374.         Else
  375.             Main!StatusBar.Caption = "Error = " & Str$(JobNum) + " occured while trying to open the print job"
  376.         End If
  377.     End If
  378. 'Set the report window handle equal to that of the MDI child
  379. 'form so that our print window prints inside of the Window frame
  380. 'created by the Windows API call
  381.     Report_ParentWindowHandle = C.hWnd
  382.     Screen.MousePointer = 11
  383.     C.Caption = "MDIChild - " & Forms.Count
  384. 'Set the border style of the print window so that it has no border,max or min
  385. 'buttons, control box etc.
  386.     'Border_style% = 268435456
  387. 'Send the Print job to be printed to a window
  388.     If PEOutPutToWindow(JobNum, C.Caption, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight, 268435456, C.hWnd) = False Then
  389.       Main!StatusBar.Caption = "Output to Window has failed."
  390.     Else
  391.       Main!StatusBar.Caption = "Output to Window was successful."
  392.     End If
  393. 'Starts the desired print job
  394.     If PEStartPrintJob(JobNum, True) = False Then
  395.       Main!StatusBar.Caption = "Printing To Window has failed."
  396.     Else
  397.       Main!StatusBar.Caption = "Printing to Window was successful."
  398.     End If
  399.     Main!StatusBar.Caption = " Active Window :- " & C.Caption
  400.     MenuFileClose.Enabled = True
  401.     Screen.MousePointer = 0
  402. End Sub
  403. Sub MenuFormatMinSectionHeight_Click ()
  404.  MsgBox "Not Yet Implemented!"
  405. End Sub
  406. Sub MenuFormatRptTitle_Click ()
  407.   RPTTITLE.Show
  408. End Sub
  409. Sub MenuFormatSetLineHeight_Click ()
  410.  MsgBox "Not Yet Implemented!"
  411. End Sub
  412. Sub MenuFormatSetMargins_Click ()
  413.  MsgBox "Not Yet Implemented!"
  414. End Sub
  415. Sub MenuFormatSetSecFormat_Click ()
  416.  Section.Show
  417. End Sub
  418. Sub MenuFormatSetSectionFont_Click ()
  419. 'Invoke common dialogue to choose a report file name
  420.     'CMDialog1.Action = 4
  421.      Font.Show
  422. End Sub
  423. Sub MenuFormulasSetFormula_Click ()
  424.  SetFormula.Show
  425. End Sub
  426. Sub MenuFormulasSetSelForm_Click ()
  427.   SetFormula.Show
  428. End Sub
  429. Sub MenuGroupCond_Click ()
  430.  Groupcond.Show
  431. End Sub
  432. Sub MenuLogoff_Click ()
  433.     Dim logonInfo As PELogonInfo
  434.     logonInfo.StructSize = Len(logonInfo)
  435.     logonInfo.ServerName = "ODBCSQL" + Chr$(0)
  436.     logonInfo.DatabaseName = "pubs" + Chr$(0)
  437.     logonInfo.UserID = "tech" + Chr$(0)
  438.     logonInfo.Password = "tech" + Chr$(0)
  439.     If PELogOFFServer("PDSODBC.DLL", logonInfo) = 1 Then
  440.        MsgBox ("PELogOFFServer Succeeded!")
  441.     Else
  442.       RCode = GetErrorString(JobNum)
  443.       MsgBox "PELogOFFServer Error #: " + Str(ErrorCode) + " - " + RCode
  444.     End If
  445. End Sub
  446. Sub MenuLogon_Click ()
  447.     Dim logonInfo As PELogonInfo
  448.     logonInfo.StructSize = Len(logonInfo)
  449.     logonInfo.ServerName = "ODBCSQL" + Chr$(0)
  450.     logonInfo.DatabaseName = "pubs" + Chr$(0)
  451.     logonInfo.UserID = "tech" + Chr$(0)
  452.     logonInfo.Password = "tech" + Chr$(0)
  453.     If PELogOnServer("PDSODBC.DLL", logonInfo) = 1 Then
  454.       MsgBox ("PELogOnServer Succeeded!")
  455.     Else
  456.       RCode = GetErrorString(JobNum)
  457.       MsgBox "PELogOnServer Error #: " + Str(ErrorCode) + " - " + RCode
  458.     End If
  459. End Sub
  460. Sub MenuLogonInfo_Click ()
  461.  SETLOGON.Show
  462. End Sub
  463. Sub MenuModSQL_Click ()
  464.  SQLQUERY.Show
  465. End Sub
  466. Sub MenuPrintdestination_Click ()
  467.  Outputdest.Show 1
  468. End Sub
  469. Sub MenuPrintFile_Click ()
  470. Dim Path As String
  471. Path = InputBox("Please enter text file name with path:", "Text File Name")
  472. If PEOutPutToFile(JobNum, Path, 2, 0) = 1 Then
  473.     MsgBox ("Export to file was successful!")
  474.  Else
  475.     MsgBox ("Export to file has failed!")
  476.  End If
  477. End Sub
  478. Sub MenuPrintStart_Click ()
  479. 'Starts the desired print job
  480.     If PEStartPrintJob(JobNum, True) = False Then
  481.       RCode = GetErrorString(JobNum)
  482.       MsgBox "PEStartPrintJob Error #: " + Str(ErrorCode) + " - " + RCode
  483.     Else
  484.       Outputdest!StatusBar.Caption = "Print Job was Successful."
  485.     End If
  486. End Sub
  487. Sub MenuPrintWindow_Click ()
  488. Dim C As New Child
  489.     Report_ParentWindowHandle = C.hWnd
  490.     'Screen.MousePointer = 11
  491.     C.Caption = "MDIChild - " & Forms.Count
  492. 'Set the border style of the print window so that it has no border,max or min
  493. 'buttons, control box etc.
  494.     'Border_style% = 268435456
  495. 'Send the Print job to be printed to a window
  496.     If PEOutPutToWindow(JobNum, C.Caption, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight, 268435456, C.hWnd) = False Then
  497.       Main!StatusBar.Caption = "Output to Window has failed."
  498.     Else
  499.       Main!StatusBar.Caption = "Output to Window was successful."
  500.     End If
  501. End Sub
  502. Sub MenuSecurity_Click ()
  503.  Security.Show
  504. End Sub
  505. Sub MenuServerManagementLogoffServer_Click ()
  506.     Dim logonInfo As PELogonInfo
  507.     logonInfo.StructSize = Len(logonInfo)
  508.     logonInfo.ServerName = "ODBCSQL" + Chr$(0)
  509.     logonInfo.DatabaseName = "pubs" + Chr$(0)
  510.     logonInfo.UserID = "tech" + Chr$(0)
  511.     logonInfo.Password = "tech" + Chr$(0)
  512.     If PELogOFFServer("PDSODBC.DLL", logonInfo) = 1 Then
  513.        MsgBox ("PELogOFFServer Succeeded!")
  514.     Else
  515.       RCode = GetErrorString(JobNum)
  516.       MsgBox "PELogOFFServer Error #: " + Str(ErrorCode) + " - " + RCode
  517.     End If
  518. End Sub
  519. Sub MenuServerManagementLogonInfo_Click ()
  520.   SETLOGON.Show
  521. End Sub
  522. Sub MenuServerManagementLogonServer_Click ()
  523.     Dim logonInfo As PELogonInfo
  524.     logonInfo.StructSize = Len(logonInfo)
  525.     logonInfo.ServerName = "ODBCSQL" + Chr$(0)
  526.     logonInfo.DatabaseName = "pubs" + Chr$(0)
  527.     logonInfo.UserID = "tech" + Chr$(0)
  528.     logonInfo.Password = "tech" + Chr$(0)
  529.     If PELogOnServer("PDSODBC.DLL", logonInfo) = 1 Then
  530.       MsgBox ("PELogOnServer Succeeded!")
  531.     Else
  532.       RCode = GetErrorString(JobNum)
  533.       MsgBox "PELogOnServer Error #: " + Str(ErrorCode) + " - " + RCode
  534.     End If
  535. End Sub
  536. Sub MenuServerManagementSQLQuery_Click ()
  537.  SQLQUERY.Show
  538. End Sub
  539. Sub MenuWindowArrange_Click ()
  540.     Me.Arrange ARRANGE_ICONS
  541. End Sub
  542. Sub MenuWindowCascade_Click ()
  543.     Me.Arrange CASCADE
  544. End Sub
  545. Sub MenuWindowTileH_Click ()
  546.     Me.Arrange TILE_HORIZONTAL
  547. End Sub
  548. Sub MenuWindowTileV_Click ()
  549.     Me.Arrange TILE_VERTICAL
  550. End Sub
  551. Sub Preview_Click ()
  552. Dim C As New Child
  553. Dim JobNum As Integer
  554. 'Open the Crystal Reports Print engine(i.e CRPE.DLL)
  555. 'Return of True(1) or false(0)
  556.     If PEOpenEngine() = False Then
  557.       Main!StatusBar.Caption = "The engine did not open"
  558.     Else
  559.       Main!StatusBar.Caption = "The engine is now open"
  560.     End If
  561. 'Check to see if Print job already exists
  562.     If JobNum <> 0 Then
  563.       Main!StatusBar.Caption = "Job is already open"
  564.     End If
  565. 'Invoke common dialogue to choose a report file name
  566.     CMDialog1.Action = 1
  567. 'Open Print job using specified file name. The return value
  568. 'is either true(1) or false(0)
  569.     If CMDialog1.Filename <> "" Then
  570.         JobNum = PEOpenPrintJob(CMDialog1.Filename)
  571.         If JobNum <> 0 Then
  572.             Main!StatusBar.Caption = "Job opened."
  573.         Else
  574.             Main!StatusBar.Caption = "Error = " & Str$(JobNum) + " occured while trying to open the print job"
  575.         End If
  576.     End If
  577. 'Set the report window handle equal to that of the MDI child
  578. 'form so that our print window prints inside of the Window frame
  579. 'created by the Windows API call
  580.     Report_ParentWindowHandle = C.hWnd
  581.     Screen.MousePointer = 11
  582.     C.Caption = "MDIChild - " & Forms.Count
  583. 'Set the border style of the print window so that it has no border,max or min
  584. 'buttons, control box etc.
  585.     'Border_style% = 268435456
  586. 'Send the Print job to be printed to a window
  587.     If PEOutPutToWindow(JobNum, C.Caption, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight, 268435456, C.hWnd) = False Then
  588.       Main!StatusBar.Caption = "Output to Window has failed."
  589.     Else
  590.       Main!StatusBar.Caption = "Output to Window was successful."
  591.     End If
  592. 'Starts the desired print job
  593.     If PEStartPrintJob(JobNum, True) = False Then
  594.       Main!StatusBar.Caption = "Printing To Window has failed."
  595.     Else
  596.       Main!StatusBar.Caption = "Printing to Window was successful."
  597.     End If
  598.     Main!StatusBar.Caption = " Active Window :- " & C.Caption
  599.     MenuFileClose.Enabled = True
  600.     Screen.MousePointer = 0
  601. End Sub
  602.